package com.dq.Week2.day09.dict;

import com.dq.Week2.day09.pritice.Hero;

public class ObjectDemo {

    public static void main(String[] args) {

        Hero hero1 = new Hero("永恩",200,20);
        Hero hero2 = new Hero("永恩",200,20);

        boolean equals = hero1.equals(hero2);
        System.out.println(equals);

        Dog dogo1 = new Dog("bug",20,999);
        Dog dogo2 = new Dog("bug",20,999);

        boolean isEquals = dogo1.equals(dogo2);
        System.out.println(isEquals);
    }
}
